﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>派送管理</title>
    <link rel="stylesheet" type="text/css" href="~/Content/jquery-easyui-1.4.2/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="~/Content/jquery-easyui-1.4.2/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="~/Content/jquery-easyui-1.4.2/demo.css">
    <link href="~/Content/Styles/Manage_Order.css" rel="stylesheet" />
    <script type="text/javascript" src="~/Content/jquery-easyui-1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="~/Content/jquery-easyui-1.4.2/jquery.easyui.min.js"></script>
    <script src="~/Content/jquery-easyui-1.4.2/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript">

        var currentdate;
        var conid = "";
        $(function () {
            //initTable();
            GetOrder_FormType(); // 订单状态下拉框
            $(document).ready(function () {
                setInterval(initTable, 600000);//每过一分钟刷新一次datagrid
            });

            init();
        });


        function getformid() {  //czx:获取当前商户的最大订单ID
            var formid = $('#load').datagrid('getData');
            var ddh = formid.rows[0].FormID;

            document.getElementById("orderid").value = ddh;

        }


        function init() {
            var date = new Date();
            var y = date.getFullYear();
            var m = date.getMonth() + 1;
            var d = date.getDate();
            if (m >= 1 && m <= 9) {
                m = "0" + m;
            }
            if (d >= 0 && d <= 9) {
                d = "0" + d;
            }
            currentdate = y + m + d;
            //date = date.toLocaleDateString().replace("/", "");
            //a = date.replace("/", "");
            //console.log(date);
            //console.log(a);
            console.log(currentdate);
            $.get("/Send/getOrderFormType", {}, function (resp) {
                console.log(resp);
                for (var i in resp) {
                    conid = conid + resp[i].ConID + ",";
                }
                console.log(conid);
                conid = conid.substring(0,conid.length-1);
                console.log(conid);
                initTable();
            })
            
        }


        //初始化表格
        function initTable() {
            $('#load').datagrid({
                iconCls: 'icon-user',
                loadMsg: '数据加载中...',
                nowrap: true,
                autoRowHeight: true,
                striped: true,
                url: '/Send/GetSendForm?FormID=&FormControl=' + conid + '&FormTimeS=' + currentdate + '&FormTimeE=' + currentdate,
                //url: '/Send/GetSendForm?FormID=&FormControl=&FormTimeS=&FormTimeE=',
                sortName: 'FormID',
                sortOrder: 'asc',
                border: true,
                remoteSort: false,
                idField: 'FormID',
                pageSize: 10,
                singleSelect: true,
                pagination: true,
                rownumbers: true,
                columns: [[
                    { field: 'FormID', title: '订单编号', width: 80, sortable: true, align: 'center' },
                    { field: 'MerName', title: '商户名称', width: 80, sortable: true, align: 'center' },
                    { field: 'ConText', title: '订单状态', width: 80, sortable: true, align: 'center' },
                    //{
                    //    field: 'ConID', title: '订单状态', width: 100, sortable: true, align: 'center', formatter: function (val) {
                    //        if (val == 101) {
                    //            return '未指派'
                    //        }
                    //    }
                    //},
                    { field: 'OperNum', title: '最后操作员', width: 150, sortable: true, align: 'center' },
                    //{
                    //    field: 'LastUser', title: "最后操作员", width: 150, align: 'center', align: 'center', formatter: function (rec) {
                    //        if (rec == 1) {
                    //            return '调度员';
                    //        }
                    //        else if (rec == 0)
                    //        {
                    //            return '派送员';
                    //        }
                    //    }
                    //},
                    {
                        field: 'LastTime', title: "最后操作时间", width: 250, sortable: true, align: 'center', formatter: function (val) {
                            if (val != undefined) {
                                var date = val.substring(0, 4) + "-" + val.substring(4, 6) + "-" + val.substring(6, 8) + " " + val.substring(8, 10) + ":" + val.substring(10, 12) + ":" + val.substring(12, 14);
                                return date;
                            }
                        }
                    },
                    { field: 'IntBZ', title: "备注", width: 100, sortable: true, align: 'center' },
                    {
                        field: 'FormState', title: "有效状态", width: 100, sortable: true, align: 'center', formatter: function (val) {
                            if (val == 1) {
                                return '有效';
                            }
                            else if (val == 0) {
                                return '无效';
                            }
                        }
                    },
                ]],
                toolbar: '#tb',
                onLoadSuccess: function () {
                    getformid();
                }
            });
        }

        //指派方法
        var bz;
        function Assign(FormID) {
            var send = $("#load").datagrid("getSelections");
            if (send.length == 1) {
                $("#AssignDialog").dialog("open").dialog("setTitle", "指派送餐员");
                var checkdata = $("#load").datagrid("getSelections")[0];
                bz=checkdata.BZ;
                $('#formid').textbox('setValue',checkdata.FormID);
                $.get("/Send/GetTakerByOper", { OperID: '@ViewData["OperID"]' }, function (database) {
                    $('#taker').combobox({
                        valueField: 'TakerID',
                        textField: 'TakerName',
                        data: database
                    });
                });
            }
            else {
                $.messager.alert("友情提示", "每次只能指派一条订单，你已经选择了<font color='red' size='6'>" + send.length + "</font>条");
            }
        }

        //确定指派
        function BindAssignClickEvent()
        {
            var now = new Date();
            var a = now.getFullYear();       //年
            var b = now.getMonth() + 1;     //月
            var c = now.getDate();            //日

            var d = now.getHours();            //时
            var e = now.getMinutes();          //分
            var f = now.getSeconds();
            var time = a + "" + b + "" + c + "" + d + "" + e + "" + f;

            var postdata = {
                FormID: $('#formid').textbox('getValue'),
                TakerID: $('#taker').combobox('getValue'),
                ConID:102 ,
                LastUser:'@ViewData["OperID"]' ,
                LastTime: time,
                BZ: bz,
                SendState:1
            };
            //使用异步实现修改派送员信息
            $.post("/Send/Assign?Tag=" + 2, postdata, function (data) {
                if (data == "1") {
                    $("#AssignDialog").dialog('close');
                    $.messager.alert("提示", "指派成功");
                    $("#load").datagrid('reload');

                }
                else {
                    $.messager.alert("友情提示", "指派失败，请检查");
                }
            });
        }

        //确定指派--明细中
        var bz1;
        function BindAssignClickEvent1() {
            var now = new Date();
            var a = now.getFullYear();       //年
            var b = now.getMonth() + 1;     //月
            var c = now.getDate();            //日

            var d = now.getHours();            //时
            var e = now.getMinutes();          //分
            var f = now.getSeconds();
            var time = a + "" + b + "" + c + "" + d + "" + e + "" + f;

            var postdata = {
                FormID: $('#FormID').textbox('getValue'),
                TakerID: $('#taker1').combobox('getValue'),
                //ConID: 102,
                ConID: $("#state").combobox('getValue'),
                LastUser: '@ViewData["OperID"]',
                LastTime: time,
                BZ: bz1,
                SendState: 1
            };
            console.log(judge);
            if (postdata.ConID == "" || postdata.ConID == null) {
                $.messager.alert("友情提示", "订餐状态不可为空！");
                return false;
            }
            if (judge == true) {
                console.log("两个");
                if (postdata.TakerID == "" || postdata.TakerID == null) {
                    $.messager.alert("友情提示", "请选择送餐人员！");
                    return false;
                }
                //使用异步实现修改派送员信息
                $.post("/Send/Assign?Tag=" + 1, postdata, function (data) {
                    if (data == "1") {
                        $("#editDialog").dialog('close');
                        $.messager.alert("提示", "指派成功");
                        $("#load").datagrid('reload');

                    }
                    else {
                        $.messager.alert("友情提示", "指派失败，请检查");
                    }
                });

                var postdata = {
                    FormID: $('#FormID').textbox('getValue'),
                    MerID: $("#MerID").text(),
                    FormBY: $("#state").combobox('getValue'),
                    IntBZ: $("#IntBZ").textbox('getValue'),
                    MerBZ: $("#MerBZ").textbox('getValue'),
                }
                console.log("hihao" + postdata);
                if (postdata.FormBY == "" || postdata.FormBY == null) {
                    $.messager.alert("友情提示", "订餐状态不可为空！");
                    return false;
                }
                // 修改订单状态
                $.post("/Order_Form/UpdateOrder_Form", postdata, function (resp) {
                    if (resp == "1") {
                        init();
                    }
                    else {
                        $.messager.alert("友情提示", "修改订单状态失败，请检查");
                    }
                })
            } else {
                console.log("一个");
                var postdata = {
                    FormID: $('#FormID').textbox('getValue'),
                    MerID: $("#MerID").text(),
                    FormBY: $("#state").combobox('getValue'),
                    IntBZ: $("#IntBZ").textbox('getValue'),
                    MerBZ: $("#MerBZ").textbox('getValue'),
                }
                console.log(postdata);
                if (postdata.FormBY == "" || postdata.FormBY == null) {
                    $.messager.alert("友情提示", "订餐状态不可为空！");
                    return false;
                }
                // 修改订单状态
                $.post("/Order_Form/UpdateOrder_Form", postdata, function (resp) {
                    if (resp == "1") {
                        $.messager.alert("友情提示", "修改订单状态成功");
                        $("#load").datagrid('reload');
                    }
                    else {
                        $.messager.alert("友情提示", "修改订单状态失败，请检查");
                    }
                })
            }
        }

        // 明细
        function DetailDialog() {
            var send = $("#load").datagrid("getSelections");
            if (send.length == 1) {
                $("#inputDIV").css("display", "block");
                bz1 = send[0].BZ;
                $("#gg").css("display", "none");
                $.get("/Send/GetTakerByOper", { OperID: '@ViewData["OperID"]' }, function (database) {
                    $('#taker1').combobox({
                        valueField: 'TakerID',
                        textField: 'TakerName',
                        data: database,
                        editable: false,
                    });
                    nextFormBY(send[0].FormID);
                });

                //首先获取选中的商品订单
                $.get("/Send/getFormID?FormID=" + send[0].FormID, function (resp) {
                    if (resp.total != 0) {
                        $("#editDialog").dialog("open").dialog("setTitle", "查看订单明细");
                        console.log(resp);
                        var FormPayType = resp.rows[0].FormPayType;
                        switch (resp.rows[0].FormPayType) {
                            case 0:
                                FormPayType = "现金";
                                break
                            case 1:
                                FormPayType = "钱包支付";
                                break
                            case 2:
                                FormPayType = "第三方支付";
                                break
                        }
                        var IsPay = resp.rows[0].IsPay;
                        switch (resp.rows[0].IsPay) {
                            case 0:
                                IsPay = "未支付";
                                break
                            case 2:
                                IsPay = "已支付";
                                break
                            case 3:
                                IsPay = "支付失败";
                                break
                            case 4:
                                IsPay = "现金支付";
                                break
                        }
                        var FormBY = resp.rows[0].FormBY;  //订单状态;
                        var SenTime = resp.rows[0].SenTime;
                        var FormTime = resp.rows[0].FormTime;

                        $("#MerID").text(resp.rows[0].FormMerID);
                        $("#FormBY").text(resp.rows[0].ConText);
                        $("#FormID").textbox('setValue', resp.rows[0].FormID);
                        $("#FormTime").textbox('setValue', FormTime);
                        $("#FormPayType").textbox('setValue', FormPayType);
                        $("#IsPay").textbox('setValue', IsPay);
                        $("#SenTime").textbox('setValue', SenTime);
                        $("#AccCall").textbox('setValue', resp.rows[0].AccCall);
                        $("#AccName").textbox('setValue', resp.rows[0].AccName);
                        $("#MerName").textbox('setValue', resp.rows[0].MerName);
                        
                        $("#FormAddress").textbox('setValue', resp.rows[0].FormAddress);
                        $("#DelFormMon").textbox('setValue', (resp.rows[0].DelFormMon * 0.01).toFixed(2));
                        $("#DelPackMon").textbox('setValue', (resp.rows[0].DelPackMon * 0.01).toFixed(2));
                        if (resp.rows[0].IsEva == 0)
                        { $("#IsEva").attr("checked", ''); }
                        if (resp.rows[0].IsEva == 1) {
                            $("#IsEva").attr("checked", true);
                        }
                        $("#FormPreMon").textbox('setValue', (resp.rows[0].FormPreMon * 0.01).toFixed(2)) //优惠
                        $("#FormPayMon").textbox('setValue', (resp.rows[0].FormPayMon * 0.01).toFixed(2)) //实际支付
                        $("#FormPayInt").numberbox('setValue', resp.rows[0].FormPayInt) //消费积分
                        $("#IntBZ").textbox('setValue', resp.rows[0].IntBZ) //备注
                        var a = resp.rows[0].FormDishesID + "|" + resp.rows[0].FormDisheName + "|" + resp.rows[0].FormDishesNun + "|" + resp.rows[0].FormDishesMon + "|" + resp.rows[0].FornDishesInt;
                        DishesTable(a);
                    } else {
                        $.messager.alert("友情提示","系统异常，请联系管理员解决！","info");
                    }
                })

            }
            else {
                $.messager.alert("友情提示", "每次只能查看一条订单，你已经选择了<font color='red' size='6'>" + send.length + "</font>条");
            }
        }

        //商品集合datagrid
        function DishesTable(item) {
            $('#tableDishes').datagrid({
                loadMsg: '数据加载中...',
                fitColumns: false,
                nowrap: true,
                autoRowHeight: true,
                striped: true,
                url: '/Send/getDishesgrid?Dishes=' + item,
                sortName: '',
                sortOrder: '',
                singleSelect: true,
                border: true,
                remoteSort: false,
                idField: '',
                pageSize: 30,
                pageList: [30],
                pagination: true,
                rownumbers: true
            });
        }

        //获取订单状态
        function GetOrder_FormType() {
            $.get("/Send/getOrderFormType", {}, function (database) {

                var a = {
                    ConText: "全部",
                    ConID: -8989,
                }

                database.splice(0, 0, a);

                $('#FormControl').combobox({
                    textField: "ConText",
                    valueField: "ConID",
                    data: database,
                    multiple: true,
                    editable: false,
                    formatter: function (row) {
                        //console.log(row);
                        var opts;
                        if (row.selected == true) {
                            opts = "<input type='checkbox' checked='checked' id='" + row.ConID + "' value='" + row.ConID + "'>" + row.ConText + "</input>";
                        } else {
                            opts = "<input type='checkbox' id='" + row.ConID + "' value='" + row.ConID + "'>" + row.ConText;
                        }
                        return opts;
                    },
                    panelHeight: "auto",
                    onSelect: function (rec) { // 选中一个选项
                        //console.log(rec);
                        oCheckbox = document.getElementById(rec.ConID);
                        //console.log(oCheckbox);
                        if (oCheckbox.id == -8989) { // -8989“全部”选项的id  
                            for (var i = 0; i < ($("input:checkbox").length - 1); i++) {  // html中有一个复选按钮所以长度-1
                                //console.log(i);
                                $("input:checkbox")[i].checked = true; // 复选框勾选
                                $('#FormControl').combobox('select', $("input:checkbox")[i].id);  // 选定下拉选项的值
                            }
                            return false;
                        }
                        oCheckbox.checked = true;
                        if ($("input[type='checkbox']:checked").length == ($("input:checkbox").length - 2)) { 
                            for (var i = 0; i < ($("input:checkbox").length - 1) ; i++) {
                                //console.log(i);
                                $("input:checkbox")[i].checked = true;
                                $('#FormControl').combobox('select', $("input:checkbox")[i].id);
                            }
                            return false;
                        }
                    }, onUnselect: function (rec) { // 取消一个选项
                        oCheckbox = document.getElementById(rec.ConID);
                        var a = $("#FormControl").combobox('getValues');
                        console.log(a);
                        if (oCheckbox.id == -8989) { // 是否是“全部”选项的id
                            for (var i = 0; i < ($("input:checkbox").length - 1) ; i++) {
                                $("input:checkbox")[i].checked = false; // 复选框不勾选
                                $('#FormControl').combobox('clear', 'none'); // 清除组合框（combobox）的值。
                            }
                        } else if (a.indexOf("-8989") >= 0) { // ”全部“选项是否处于选中状态
                            oCheckbox.checked = false; // 
                            document.getElementById("-8989").checked = false;
                            var value = $("#FormControl").combobox('getValues') // 获取所有值
                            $('#FormControl').combobox('clear', 'none'); // 清除组合框（combobox）的值。
                            value.splice(jQuery.inArray('-8989', value), 1); // 在数组中删除“-8989”
                            for (var i in value) {
                                $('#FormControl').combobox('select', value[i]);
                            }
                        } else {
                            oCheckbox.checked = false;
                        }
                    }


                })
                //var a = {
                //    "ConID": "",
                //    "ConText": "全部",
                //}

                ////database.push(a)
                //database.splice(0, 0, a); // 将全部的选项放在最前
                //$('#FormControl').combobox({
                //    valueField: 'ConID',
                //    textField: 'ConText',
                //    value: '',
                //    text: '全部',
                //    data: database
                //});
            })
        }

        // 检索
        function Search() {
            var postdata = {
                FormID: $("#FormControlID").textbox('getValue'),//订单ID
                FormControl: $('#FormControl').combobox("getValues"),
                FormTimeS: $('#FormTimeS').datebox("getValues"),
                FormTimeE: $('#FormTimeE').datebox("getValues"),
            }
            if (postdata.FormControl.indexOf("-8989") >= 0 || postdata.FormControl.length == 0) {
                //console.log(postdata.FormControl);
                postdata.FormControl.splice(jQuery.inArray('-8989', postdata.FormControl), 1);
            }
            console.log(postdata);
            $('#load').datagrid({
                url: '/Send/GetSendForm?FormID=' + postdata.FormID + "&FormControl=" + postdata.FormControl + "&FormTimeS=" + postdata.FormTimeS + "&FormTimeE=" + postdata.FormTimeE,
            });
            console.log(postdata);
        }

        var judge = false;
        // 获取该订单的下一个订单状态
        function nextFormBY(FormID) {
            $.get("/Send/getFormBY", {FormID: FormID }, function (resp) {
                console.log(resp);
                if (resp != "" && resp != null) {
                    
                    $("#state").combobox({
                        valueField: 'ConID',
                        textField: 'ConText',
                        data: resp,
                        editable: false,
                        onSelect: function (ac) {
                            console.log(ac);
                            if (ac.ConIsEva == 1) {
                                console.log("显示");
                                judge = true;
                                $("#gg").css("display", "inline");
                            } else {
                                console.log("隐藏");
                                judge = false;
                                $("#gg").css("display", "none");
                            }
                        }
                    })
                } else {
                    $("#inputDIV").css("display", "none");
                }
            });
        }

        window.setInterval(showalert, 5000);  //czx:每5秒钟轮循一次，查看新订单.
        function showalert() {
            //Mer = $('#SearchMer').combogrid("getValue");//获取当前商户ID(操作员)
            var OrderIdMax = document.getElementById("orderid").value;  //当前商户的最大订单ID

            $.post("/Send/getOrder?OrderId=" + OrderIdMax, function (date) {
                if (date != "-1") {  //有新订单到达，则播放声音通知    
                    audio.play();

                    $.messager.show({
                        title: "提示",
                        msg: "有" + date + "条新订单到达！",
                        showType: 'slide'
                    });

                }
               
            });

        }


    </script>

</head>
<body style="padding: 0">
    <!-- datagrid表格 -->
    <div>
        <table id="load" border="0"></table>
    </div>
    <!-- 工具栏 -->
    <div id="tb" style="padding: 5px; height: auto">
        <div style="margin-bottom: 5px">
            <a href="#" class="easyui-linkbutton" id="btndetail" iconcls="icon-more" onclick="DetailDialog()">明细</a>
            @*<a href="#" id="Assign" class="easyui-linkbutton" iconcls="icon-more" onclick="Assign()">指派</a>*@
            <hr style="margin-top: 5px" />
        </div>
        <div>
            <a>订单号：</a>
            <input id="FormControlID" class="easyui-textbox" style="width: 120px" />
            <a>订单状态：</a>
            <input id="FormControl" class="easyui-combobox" style="width: 120px" />
            <a>订餐时间：</a>
            <input id="FormTimeS" class="easyui-datebox" style="width: 120px" />
            <a>至：</a>
            <input id="FormTimeE" class="easyui-datebox" style="width: 120px" />
            <a href="#" class="easyui-linkbutton" iconcls="icon-search" onclick="Search()">检索</a>
        </div>
    </div>

    <!--指派S-->
    <div id="AssignDialog" class="easyui-dialog" style="width: 300px; padding: 10px 0" closed="true" resizable="true" modal="true" buttons="#dlg-buttons" align="center">
        <form id="Assign_form" method="post" novalidate="novalidate">
            <table>
                <tr style="height: 20px">
                    <td class="fr">派送单号：</td>
                    <td>
                        <input id="formid" class="easyui-textbox" style="width: 50px; height: 20px" readonly="true" /></td>
                </tr>
                <tr style="height: 20px">
                    <td class="fr">指派送餐员:</td>
                    <td>
                        <input id="taker" class="easyui-combobox" style="width: 80px; height: 20px" />
                    </td>
                </tr>
                <tr style="height: 20px">
                    <td class="fr" colspan="2">
                        <a id="btnAssign" href="#" onclick="BindAssignClickEvent()" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">确定指派</a>

                    </td>
                </tr>
            </table>
        </form>
    </div>
    <!--指派E-->

    <!--明细S-->
    <div id="editDialog" class="easyui-dialog" style="width:900px; padding: 10px; height:685px; padding:fixed; top:5px;" closed="true" resizable="true" modal="true" buttons="#dlg-buttons" align="center">
        <form id="editController" method="post" style="padding:10px" novalidate="novalidate">
            <span id="MerID" hidden></span>
            <table width="700" id="tbledit">
                <tr>
                    <td colspan="5" align="center" ; class="userinfo-td-r">
                        <a style="font-size:25px;color:red;text-decoration:none" id="FormBY"></a>
                    </td>
                </tr>
                <tr>
                    <td width="100" class="userinfo-td-l">订单号：</td>
                    <td width="200" class="userinfo-td-r">
                        <input class="easyui-textbox" type="text" readonly="true" id="FormID" name="FormID" />
                    </td>
                    <td></td>
                    <td width="100" class="userinfo-td-l">商户名称：</td>
                    <td class="userinfo-td-r">
                        <input class="easyui-textbox" type="text" readonly="true" id="MerName" name="MerName" />
                    </td>
                </tr>
                <tr style="display:none">
                    <td class="userinfo-td-l">支付类型：</td>
                    <td class="userinfo-td-r">
                        <input class="easyui-textbox" type="text" readonly="true" id="FormPayType" name="FormPayType" />
                    </td>
                    <td></td>
                    <td width="50" class="userinfo-td-l">支付状态：</td>
                    <td class="userinfo-td-r">
                        <input class="easyui-textbox" type="text" readonly="true" id="IsPay" name="IsPay" />
                    </td>
                </tr>
                <tr>
                    <td width="100" class="userinfo-td-l">下单时间：</td>
                    <td width="200" class="userinfo-td-r">
                        <input class="easyui-textbox" type="text" readonly="true" id="FormTime" name="FormTime" />
                    </td>
                    <td></td>
                    <td class="userinfo-td-l">送餐时间：</td>
                    <td class="userinfo-td-r">
                        <input class="easyui-textbox" type="text" readonly="true" id="SenTime" name="SenTime" />
                    </td>
                </tr>
                <tr>
                    <td class="userinfo-td-l">客户姓名：</td>
                    <td class="userinfo-td-r">
                        <input class="easyui-textbox" type="text" readonly="true" id="AccName" name="AccName" />
                    </td>
                    <td></td>
                    <td width="50" class="userinfo-td-l">联系方式：</td>
                    <td class="userinfo-td-r">
                        <input class="easyui-textbox" type="text" readonly="true" id="AccCall" name="AccCall" />
                    </td>
                </tr>
                <tr>
                    <td width="100" class="userinfo-td-l">送餐地址：</td>
                    <td class="userinfo-td-r" colspan="4"><input class="easyui-textbox" type="text" readonly="true" id="FormAddress" name="FormAddress" style="width:600px" /></td>
                </tr>
                <tr></tr>
                <tr style="text-align:center">
                    <td colspan="5">
                        <table class="easyui-datagrid" id="tableDishes" style="width: 700px; height:190px; padding: 0px;" data-options="fitColumns: false">
                            <thead>
                                <tr>
                                    <th data-options="field:'FormDisheName',width:178,align:'center'">商品名称</th>
                                    <th data-options="field:'FormDishesMon',width:120,align:'center'">单价</th>
                                    <th data-options="field:'FornDishesInt',width:120,align:'center'">积分</th>
                                    <th data-options="field:'FormDishesNun',width:120,align:'center'">数量</th>
                                    <th data-options="field:'FornDishesCount',width:129,align:'center'">总计</th>
                                </tr>
                            </thead>
                        </table>
                    </td>
                </tr>
                <tr></tr>
                <tr>
                    <td>
                        <a style="padding-right:35px;color:red" >
                         <input type="checkbox" id="IsEva" readonly="true" disabled="disabled" name="IsEva">是否评价</input>
                            </a>
                    </td>

                </tr>
                <tr>
                    <td colspan="5">

                        <a class="userinfo-td-l">已优惠：</a>
                        <a class="userinfo-td-r">
                            <input class="easyui-textbox" style="width: 80px" type="text" id="FormPreMon" readonly="true" name="FormPreMon" />
                        </a>
                        <a class="userinfo-td-l" style="padding-right:35px">元</a>
                        <a class="userinfo-td-l">
                            实际支付金额：
                        </a>
                        <a class="userinfo-td-r">
                            <input class="easyui-textbox" style="width: 80px" type="text" id="FormPayMon" readonly="true" name="FormPayMon" />
                        </a>
                        <a class="userinfo-td-l" style="padding-right:35px">元</a>
                        <a class="userinfo-td-l">
                            消耗积分：
                        </a>
                        <a class="userinfo-td-r">
                            <input class="easyui-numberbox" style="width: 80px" type="text" id="FormPayInt" readonly="true" name="FormPayInt" />
                        </a>
                        <a class="userinfo-td-l">分</a>
                    </td>
                </tr>
                <tr>
                    <td colspan="5">
                        <a class="userinfo-td-l">包装费：</a>
                        <a class="userinfo-td-r">
                            <input class="easyui-textbox" style="width: 80px" type="text" id="DelPackMon" readonly="true" name="DelPackMon" />
                        </a>
                        <a class="userinfo-td-l" style="padding-right:35px">元</a>
                        <a class="userinfo-td-l">配送费：</a>
                        <a class="userinfo-td-r">
                            <input class="easyui-textbox" style="width: 80px;" type="text" id="DelFormMon" name="DelFormMon" />
                        </a>
                        <a class="userinfo-td-l" style="padding-right:35px">元</a>
                    </td>
                </tr>
                <tr>
                    <td colspan="5">
                        <a class="userinfo-td-l" style="padding-bottom:10px">客户备注：</a>
                        <input class="easyui-textbox" data-options="multiline:true" style="width:700px;height:50px;" type="text" id="IntBZ" name="IntBZ" readonly="true" />
                        <a class="userinfo-td-l" style="padding-bottom:10px">商家补充备注：</a>
                        <input class="easyui-textbox" type="text" data-options="multiline:true" style="width:700px;height:50px;" id="MerBZ" name="MerBZ"  readonly="true"/>
                    </td>
                </tr>
            </table>

            <div align="right" id="SaveButton" style="padding-right:68px">
            </div>

            <div id="inputDIV" style="text-align:right;padding-right:70px">
                <input id="state" class="easyui-textbox" style="width: 140px; height: 24px">&nbsp;&nbsp;
                <div id="gg" style="display:none"><input id="taker1" class="easyui-textbox" style="width: 140px; height: 24px"></div>&nbsp;&nbsp;&nbsp;
                <a href="#" class="easyui-linkbutton" iconcls="icon-ok" onclick="BindAssignClickEvent1()">确认</a>
            </div>
        </form>
        @*<a href="javascript:;" onClick="doPrint()">打印</a>*@
    </div>
    <!--明细S-->
    <div>
        <audio id="audio" preload>
            <!--如果不写controls则不会显示进度条控件如： <audio controls> -->      
            <source src="~/Content/arrive.mp3" type="audio/mp3">
            <source src="~/Content/arrive.ogg" type="audio/ogg"><!--使用IIS必须在IIS中添加ogg的MIME:ogg和audio/ogg -->
            你的浏览器不支持html5的audio标签
        </audio>      
    </div>
    <input type="text" id="orderid" style="display:none"  />
</body>

</html>
